﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using SilverChart.Core.Configuration;
using SilverChart.Core.Service;

namespace SilverChart.UnitTest.Core.Configuration {
    [ServiceProvider(LayzeCreation = true, ServiceName = "Mocked Alternative Double converter", Singleton = true)]
    public class AlternativeDoubleConverter : ConfigurationConverter<Double>{

        #region ConfigurationConverter<double> Members

        public bool Convert(String itemValue, out double value) {
            value = Double.NaN;
            if (itemValue != MockedConfigurationParser.ALT_DOUBLE_VALUE) {
                return false;
            }
            value =MockedConfigurationParser.ALT_REAL_DOUBLE_VALUE;
            return true;
        }

        #endregion
    }
}
